import 'dart:math';

import 'package:flutter/material.dart';

class PlatformKeyboardPlaceholder extends StatelessWidget {
  const PlatformKeyboardPlaceholder({
    required this.backgroundColor,
    this.tabBarHeight = 0,
    super.key,
  });

  final Color backgroundColor;
  final double tabBarHeight;

  @override
  Widget build(BuildContext context) {
    return Container(
      color: backgroundColor,
      height: max(0, MediaQuery.of(context).viewInsets.bottom - tabBarHeight),
    );
  }
}
